<tpl var layoutBody={ />
<div data-identity="${{info.controlIdentity}}" data-table="${{info.modelTable}}">
	<div class="layui-breadcrumb">
		<a href="/manage/index.jspx">首页</a>
		<a href="/manage/${{info.controlMapping}}/index.jspx">${{info.name}}</a>
		<a href="javascript:;"> <cite>添加</cite></a>
	</div>
	<hr>
	<fieldset class="layui-elem-field">
		<legend>添加 ${{info.name}}</legend>
		<div class="layui-field-box">
			<form class="layui-form" action="save.json?oper=create" lay-filter="m${{info.modelName}}Form">
				<% for(item in createList!){ %>
				<div class="layui-form-item" data-type="${{item.type}}" data-isnull="${{item.isnull}}" data-name="${{item.name}}">
					<label class="layui-form-label">${{item.comment}}：</label>
					<div class="layui-input-block">
						<input type="text" name="${{item.feild}}" placeholder="请输入${{item.comment}}" autocomplete="off" class="layui-input">
					</div>
				</div>
				<% } %>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<a class="layui-btn layui-btn-primary" href="javascript:history.go(-1)">返回</a>
						<button class="layui-btn" lay-submit lay-filter="m${{info.modelName}}Form">立即提交</button>
					</div>
				</div>
			</form>
		</div>
	</fieldset>
</div>
<tpl }; />

<tpl var layoutScript={ />
<script type="text/javascript">
	layui.config({
		base: '${webCdn}/plugins/layui/modules/'
	}).extend({
		http: 'http/http.min',
		message: 'message/message.min'
	}).use(['element', 'message', 'form', 'http'], function() {
		// 绑定表单提交事件
		layui.form.on('submit(m${{info.modelName}}Form)', function(data) {
			layui.http.post('save.json?oper=create', data.field, function (res) {
				layui.message.success(res.message, () => history.back());
			});

			return false;
		});
	});
</script>
<tpl }; />
<tpl include("${{info.controlPathByTpl}}tpl/layout-scroll.html",{identity:"${{info.controlIdentity}}",layoutBody:layoutBody,layoutScript:layoutScript}){}/>